<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
    <title th:text="${pageTitle}"></title>
    <div data-th-replace="layout/head-top"></div>
</head>
<body class="gray-bg">
<div class="animated fadeInLeft">
    <div class="ibox float-e-margins">
        <div class="ibox-content ">
            <div class="row pt10">
                <div class="col-lg-4 col-md-5 col-sm-6">
                    <div class="shop-ex-body" style="width: 360px">
                        <div class="shop-header-ele">
                            <span class="c-000 fs18">268教育软件</span>
                        </div>
                        <div class="shop-ex-ele" style="height: 620px">
                            <div class="creatDialogAdsShowEle">
                                <div class="cda-pop" th:if="${popupSlogan['imag']} != null ">
                                    <img th:src="@{{path}/admin/v3/img/default/icon_close.png(path=${staticPath})}" class="cda-pop-close">
                                    <img class="cda-pop-img popupSloganImag"  th:src="${popupSlogan['imag']}"/>
                                </div>
                                <div class="cda-pop" th:if="${popupSlogan['imag']} ==null">
                                    <img th:src="@{{path}/admin/v3/img/default/icon_close.png(path=${staticPath})}" class="cda-pop-close">
                                    <img class="cda-pop-img popupSloganImag" th:src="@{{path}/admin/v3/img/default/img_default.png(path=${staticPath})}"/>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <form id="createPopupSloganFrom">
                    <input name="id" th:value="${popupSlogan['id']}" type="hidden"/>
                    <div class="col-lg-8 col-md-7 col-sm-6">
                        <section class="m-r">
                            <div class="form-group pt10">
                                <label><span class="c-red">*</span>广告名称</label>
                                <input placeholder="请输入广告名称，不超过10个字" class="form-control" name="name" type="text" maxlength="10" th:value="${popupSlogan['name']}"/>
                            </div>
                            <div class="form-group pt10">
                                <input type="hidden" name="imag" id="imag" th:value="${popupSlogan['imag']}"/>
                                <label><span class="c-red">*</span>广告图片</label>
                                <div class="clearfix" id="coverImage">
                                    <div class="file-box">
                                        <div class="file">
                                            <span class="corner" title="删除" id="removeImage"><i
                                                    class="fa fa-remove"></i></span>
                                            <div class="image">
                                                <img width="100%" alt="广告图片" name="imag" class="img-responsive popupSloganImag" th:src="${popupSlogan['imag']}"/>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="pull-left">
                                        <button class="btn btn-primary btn-outline" type="button" id="popupSloganImagButton"><i
                                                class="fa fa-upload"></i>&nbsp;上传广告图
                                        </button>
                                        <br>
                                        <span class="c-999 fs12">建议尺寸600x800px，PNG、JPG格式， 图片小于2M。</span>
                                        <br><br>
                                        <span class="c-master"
                                              data-container="body"
                                              data-html="true"
                                              data-toggle="popover"
                                              data-trigger="hover"
                                              data-placement="left"
                                              th:attrappend="data-content='<div class=text-center><p>弹窗广告图片可以制作为规则的卡片型或不规则的氛围型，适用于PC端和移动端，<br />建议尺寸为宽度600像素*高度800像素；若为不规则的氛围型广告，请使用png格式的图片。</p><img width=250 src='+${staticPath}+'/admin/v3/img/default/cda-ads-pic.jpg /></div>'"
                                              data-original-title="" title="">
                                        广告图说明
                                    </span>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group pt10">
                                <label><span class="c-red">*</span>设置链接地址</label>
                                <section class="clearfix">
                                    <aside class="pull-left" style="width: 20%">
                                        <select class="form-control" name="chainedType" id="chainedType">
                                            <option value="">— 请选择 —</option>
                                            <option value="0" th:selected="${popupSlogan['chainedType']}==0">不设置链接</option>
                                            <option value="1" th:selected="${popupSlogan['chainedType']}==1">设置链接</option>
                                            <option value="2" th:selected="${popupSlogan['chainedType']}==2">三方客服</option>
                                        </select>
                                    </aside>
                                    <aside class="pull-left" style="width: 80%">
                                        <input type="text" placeholder="链接目标地址" class="form-control" name="chained" id="chained" th:value="${popupSlogan['chained']}"/>
                                    </aside>
                                    <span class="c-999 fs12">移动端仅支持课程链接,直接复制h5课程链接即可</span>
                                </section>
                            </div>
                            <div class="form-group pt10">
                                <label><span class="c-red">*</span>投放时间</label>
                                <section class="clearfix">
                                    <aside class="pull-left">
                                        <input placeholder="开始时间" class="form-control" type="text" id="startTime" name="startTime" th:value="${popupSlogan['startTime']}"/>
                                    </aside>
                                    <span class="pull-left m-t-sm m-l-sm m-r-sm">至</span>
                                    <aside class="pull-left">
                                        <input placeholder="结束时间" class="form-control" type="text" id="endTime" name="endTime" th:value="${popupSlogan['endTime']}"/>
                                    </aside>
                                </section>
                            </div>
                            <div class="form-group pt10">
                                <label><span class="c-red">*</span>投放渠道</label>
                                <div class="checkbox i-checks">
                                    <label>
                                        <input name="putDitchPc" data-value="1" type="checkbox"  th:checked="${popupSlogan['putDitchPc']}==null or ${popupSlogan['putDitchPc']}=='1'" value="1">
                                        PC端
                                    </label>
                                    <label>
                                        <input name="putDitchMobile" data-value="2" type="checkbox" th:checked="${popupSlogan['putDitchMobile']}!=null and ${popupSlogan['putDitchMobile']}=='1'" value="1">
                                        移动端(h5\Android\iOS)
                                    </label>
                                </div>
                            </div>
                            <div class="form-group pt10">
                                <label><span class="c-red">*</span>出现频次</label>
                                <div class="checkbox i-checks">
                                    <label>
                                        <input name="appearType" type="radio" th:checked="${popupSlogan['appearType']}==null or ${popupSlogan['appearType']}=='1'" value="1">
                                        首次访问页面时出现，之后不再出现
                                    </label>
                                </div>
                                <div class="checkbox i-checks">
                                    <label>
                                        <input name="appearType" type="radio" th:checked="${popupSlogan['appearType']}!=null and ${popupSlogan['appearType']}=='2'"value="2">
                                        出现时间段，每
                                        <input type="number" name="appearData" class="form-control" style="display: inline;width: 60px;" th:value="${popupSlogan['appearData']}"/>
                                        天出现一次
                                    </label>
                                </div>
                            </div>
                        </section>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<div data-th-replace="layout/head-footer"></div>
<script type="text/javascript" th:src="@{{path}/admin/business/upload/common-webuploader.js?v={v}(path=${staticPath},v=${v})}"></script>
<script type="text/javascript" th:src="@{{path}/admin/libs/plugins/layer/laydate/laydate.js?v={v}(path=${staticPath},v=${v})}"></script>
<script th:src="@{{path}/admin/business/planTools/popupSlogan/save-popupSlogan.js?v={v}(path=${staticPath},v=${v})}"></script>
</body>
</html>